package com.luying.dao;

import com.luying.pojo.MenuList;
import com.luying.pojo.PageQuery;
import com.luying.pojo.StudentInfo;
import com.luying.pojo.User;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface UserDao extends Mapper<User> {
    /**
     * 查询该用户的菜单
     * @param id
     * @return
     */
    MenuList selectMenus(@Param("id") Integer id);

    List<User> selectPage(@Param("query")PageQuery pageQuery);

    int updateById(@Param("user") User user);

    User selectById(@Param("id") Integer id);

    int deleteById(@Param("id")Integer id);

    List<StudentInfo> studentClassList();

    int insertStudentClass(@Param("studentId") Integer studentId, @Param("classId") Integer classId);

    int selectStudentClassByStudentId(@Param("studentId") Integer studentId);

    int updateStudentClass(@Param("studentId") Integer studentId, @Param("classId") Integer classId);

    int updatePasswordByAccount(@Param("password") String s,@Param("account") String account);
}
